package com.sharding.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.sharding.service.DemoService;

/**
 * Created by dongjigong on 2018/6/6.
 *
 * @Email osbornjonny@126.com
 * @Description
 */
@Controller
@RequestMapping("/demo")
public class DemoController {

    @Autowired
    private DemoService demoService;

    @RequestMapping("")
    @ResponseBody
    public String test() {

        //demoService.queryOrders();
        demoService.createOrder();
        return "11";
    }

    //测试对teacher进行分库.
    @RequestMapping("/teacher")
    @ResponseBody
    public String tacherTest(){
        demoService.spileTeacher();
        return "success";
    }

}
